/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 */

import { Module } from '@ohos/hvigor';

import { DefaultNpmDependency } from './default-npm-dependency.js';
import { DependencyBuilder } from './dependency-builder.js';

/**
 * module依赖的工程内的本地har模块
 *
 * @since 2022/5/7
 */
export class DefaultModuleDependency extends DefaultNpmDependency {
  private readonly _module: Module; // 工程中的build-profile.json5中的module name

  constructor(dependencyBuilder: DependencyBuilder) {
    super(dependencyBuilder);
    this._module = dependencyBuilder.getModule();
  }

  getModuleName() {
    return this._module.getName();
  }

  getModule() {
    return this._module;
  }
}
